//
//  KDNavigationController.m
//  警用舆情平台
//
//  Created by 魏强 on 15/5/12.
//  Copyright (c) 2015年 魏强. All rights reserved.
//

#import "KDNavigationController.h"

@interface KDNavigationController ()

@end

@implementation KDNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    //设置navgBar的主题
    [self setUpNavbarTheme];

}

- (void)setUpNavbarTheme
{
    self.navigationBar.barTintColor = KDColor;
    self.navigationBar.translucent = NO;
    UIView *statusBarView=[[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, 20)];
    statusBarView.backgroundColor=KDColor;
    [self.view addSubview:statusBarView];
    self.navigationBar.tintColor = [UIColor whiteColor];
    self.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName:[UIFont boldSystemFontOfSize:18]};
}
- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}
#pragma 重写父类push方法
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    
    if ((self.viewControllers.count > 0) && (viewController != self.viewControllers[0])) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
    
    
    
}
@end
